<%@ page language="java" contentType="text/html; charset=UTF-8"   pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<c:if test="${pageBean.totalRecords > 0 }">
</c:if>
	<div class="pagination pagination-right">
		<ul >
		    
		    <c:choose>
		    	<c:when test="${pageBean.toPre }">
		    		<li><a href="javascript:void(0)"  onclick="gotoPage(${pageBean.currentPage - 1})"  >&lt;&lt;</a></li>
		    	</c:when>
		    	<c:otherwise>
		    		<li class="disabled" ><a href="javascript:void(0)">&lt;&lt;</a></li>
		    	</c:otherwise>
		    </c:choose>
		    <c:choose>
			    <c:when test="${pageBean.currentPage - pageBean.padding > 2}">
			    	<li><a href="javascript:void(0)"  onclick="gotoPage(1)"  >1</a></li>
			    	<li class="disabled" ><a href="javascript:void(0)">...</a></li>
			    	<c:forEach var="i" begin="0" end="${pageBean.padding - 1}">
			    		<li><a href="javascript:void(0)"  onclick="gotoPage(${pageBean.currentPage - pageBean.padding + i })"  >${pageBean.currentPage - pageBean.padding + i  }</a></li>
			    	</c:forEach>
			    </c:when>
		    	<c:otherwise>
			    	<c:forEach var="i" begin="2" end="${pageBean.currentPage }">
			    		<li><a href="javascript:void(0)"  onclick="gotoPage(${i - 1})"  >${i - 1}</a></li>
			    	</c:forEach>
		    	</c:otherwise>
		    </c:choose>
		    <li class="active"><a href="javascript:void(0)"  onclick="gotoPage(${pageBean.currentPage })"  >${pageBean.currentPage }</a></li>
			<c:choose>
				<c:when test="${pageBean.currentPage + pageBean.padding < pageBean.totalPages - 1 }">
					<c:forEach var="i" begin="1" end="${pageBean.padding }">
			    		<li><a href="javascript:void(0)"  onclick="gotoPage(${pageBean.currentPage + i })"  >${pageBean.currentPage + i }</a></li>
			    	</c:forEach>
		    		<li class="disabled" ><a href="javascript:void(0)">...</a></li>
		    		<li><a href="javascript:void(0)"  onclick="gotoPage(${pageBean.totalPages})"  >${pageBean.totalPages}</a></li>
				</c:when>
				<c:otherwise>
					<c:forEach var="i" begin="${pageBean.currentPage + 1 }" end="${pageBean.totalPages }">
			    		<li><a href="javascript:void(0)"  onclick="gotoPage(${i })"  >${ i  }</a></li>
			    	</c:forEach>
				</c:otherwise>
			</c:choose>
		    <c:choose>
		    	<c:when test="${pageBean.toNext }">
		    		<li><a href="javascript:void(0)"  onclick="gotoPage(${pageBean.currentPage + 1})"  >&gt;&gt;</a></li>
		    	</c:when>
		    	<c:otherwise>
		    		<li class="disabled" ><a href="javascript:void(0)">&gt;&gt;</a></li>
		    	</c:otherwise>
		    </c:choose>
		   
		   <li><a >第 ${pageBean.currentPage} 页/共 ${pageBean.totalPages} 页/共 ${pageBean.totalRecords} 条记录</a></li>
		   
		</ul>
	</div>
